<?php $this->placeholder('onReady')->captureStart() ?>
	var oTable = $("#<?php echo $this->id_tablesorter?>").dataTable({
	     "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
         "sScrollX": "100%",
		 "sScrollXInner": "100%",
		 "bScrollCollapse": true,
         "sPaginationType": "full_numbers",
         "bStateSave": true,
         "sDom": '<"add-add fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix"pf<"clear">>rt<"fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"lpi<"clear">>',
         "bJQueryUI": true,
    
    }); 

    $("tfoot input").keyup( function () {
        /* Filter on the column (the index) of this element */
        oTable.fnFilter( this.value, $("tfoot input").index(this) );
    } );
  $("tfoot input").each( function (i) {
        asInitVals[i] = this.value;
    } );
     
    $("tfoot input").focus( function () {
        if ( this.className == "search_init" )
        {
            this.className = "";
            this.value = "";
        }
    } );
     
    $("tfoot input").blur( function (i) {
        if ( this.value == "" )
        {
            this.className = "search_init";
            this.value = asInitVals[$("tfoot input").index(this)];
        }
    } );


    $('.add-add').prepend($('.utiladd'));
    


    $('.sgit_filtro input[name=fecha_baja]').datepicker(); 
    $('.sgit_filtro input[name=fecha_alta]').daterangepicker(); 
    $(".sgit_filtro input[name=pep]" ).ajaxComplete('/utility-computing-servidores','pep','idZona/<?=$this->idZona?>');
    $(".sgit_filtro input[name=ticket]" ).ajaxComplete('/utility-computing-servidores','ticket_cliente','idZona/<?=$this->idZona?>');


<?php $this->placeholder('onReady')->captureEnd() ?>

<?php
$style = <<<STYLE


STYLE;

$script = <<<SCRIPT
var asInitVals = new Array();
SCRIPT;

if($style)$this->headStyle()->appendStyle($style);
if($script)$this->headScript()->appendScript($script);
?>



<?php echo $this->anchorZona($this->idZona,$this->controllerName.'/insertar','Add',array('class'=>'utiladd'));?>


<table id="<?= $this->id_tablesorter?>"> 
	<thead>
        <tr> 
        	<th>Customer</th>
            <th>PEP</th>
            <th>Ticket Nec</th> 
            <th>Ticket Customer</th> 
            <th>Start Date</th>
            <th>End Date</th>
            <th>Server Type</th>
        	<th>Server Name</th>
            <th>LUN</th>
            <th>Excess Storage (GB)</th>
            <th>Extra RAM (GB)</th>
            <th>Internet (Mbps)</th>
            <th>Monitoring</th>
            <th>Backup (GB)</th>
            <th>Firewall (Rules)</th>
            <th class="configure" ></th> 
        </tr> 
    </thead>
    <tbody>
        <?php echo $this->partialLoop($this->controllerName.'/fila.phtml', (array)$this->rows); ?>	
    </tbody>
   	<tfoot>
	<tr>
    	<th><input type="text" value="Filter" class="search_init" /></th>
    	<th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th><input type="text" class="search_init" /></th>
        <th></th>

	</tr>
	</tfoot>
</table>


       
